package com.kamkor.interviewer.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.kamkor.interviewer.shared.UserDetails;

/**
 * 
 * @author kamkor
 *
 */
public class MergeInterviewEvent extends GwtEvent<MergeInterviewEventHandler> {
	public static Type<MergeInterviewEventHandler> TYPE = new Type<MergeInterviewEventHandler>();
	
	private UserDetails userDetails;
	
	public MergeInterviewEvent(Long interviewId, Long adminKey) {
		super();
		userDetails = new UserDetails(interviewId, adminKey);
	}	

	public UserDetails getUserDetails() {
		return userDetails;
	}	
	
	@Override
	protected void dispatch(MergeInterviewEventHandler handler) {
		handler.onMergeInterview(this);		
	}

	@Override
	public Type<MergeInterviewEventHandler> getAssociatedType() {
		return TYPE;
	}
}
